<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box1">
        <div class="box2">盒子的内容</div>
    </div>
</body>
<style>
    .box1{
        width: 300px;
        height: 200px;
        background: pink;
    }
    /* .box2{
        width: 300px;
        height: 100px;
        background: yellowgreen;
        padding: 10px;
        border: 5px solid black;
        margin: 10px;
    } */
    .box2{
        /* width: 300px; */
        height: 100px;
        background: blueviolet;
        padding: 10px;
        border: 5px solid black;
        margin: 10px;
    }
</style>
</html>